package com.sd.reader;

import com.sd.activity.R;

/**
 * 
 * 阅读设置
 * 
 * @author Alex.Lu
 *
 */
public class ReaderSet {

	/**
	 * 字体大小
	 */
	private float mFontSize;
	/**
	 * 
	 */
	private float mLineSpace;
	/**
	 * 亮度
	 */
	private int mBrightness;
	/**
	 * 背景颜色
	 */
	private int mThemeBg;
	/**
	 * 翻页模式
	 */
	private int mFlipMode;
	
	private static ReaderSet instance;
	
	public static ReaderSet getInstance(){
		if(instance == null){
			instance = new ReaderSet();
		}
		return instance;
	}
	
	private ReaderSet(){
		
		mFontSize = 24;
		mLineSpace = mFontSize;
		mBrightness = 255;
		mThemeBg = R.color.wheat;
		mFlipMode = 0;
	}
	/**
	 * 获取字体大小
	 * @return
	 */
	public float getmFontSize() {
		return mFontSize;
	}

	/**
	 * 设置字体大小
	 * @param mFontSize
	 */
	public void decreaseFontSize() {
		this.mFontSize = mFontSize - 3;
	}
	
	/**
	 * 设置字体大小
	 * @param mFontSize
	 */
	public void increaseFontSize() {
		this.mFontSize = mFontSize + 3;
	}

	/**
	 * 减少行间距
	 */
	public void decreaseLineSpace(){
		this.mLineSpace = mLineSpace -3;
	}
	
	/**
	 * 增加行间距
	 */
	public void increaseLineSpace(){
		this.mLineSpace = mLineSpace +3;
	}
	
	/**
	 * 
	 * 返回一个行间距
	 * @return
	 */
	public float getLineSpace(){
		return mLineSpace;
	}
	
	/**
	 * 获取亮度
	 * @return
	 */
	public int getmBrightness() {
		return mBrightness;
	}

	/**
	 * 设置亮度
	 * @param mBrightness
	 */
	public void setmBrightness(int mBrightness) {
		this.mBrightness = mBrightness;
	}

	/**
	 * 获取背景主题背景色
	 * @return
	 */
	public int getmThemeBg() {
		return mThemeBg;
	}

	/**
	 * 设置背景主题色
	 * @param mThemeBg
	 */
	public void setmThemeBg(int mThemeBg) {
		this.mThemeBg = mThemeBg;
	}

	/**
	 * 获取翻页模式
	 * @return
	 */
	public int getmFlipMode() {
		return mFlipMode;
	}

	/**
	 * 设置翻页模式
	 * @param mFlipMode
	 */
	public void setmFlipMode(int mFlipMode) {
		this.mFlipMode = mFlipMode;
	}
	
	/**
	 * 保存当前设置
	 */
	public void saveReadSet(){
		//
	}
}
